<template>
  <div>
<common-head title="我的" />
    <div class="abc">
      <div class="wrap">
<img
          src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201810%2F19%2F20181019100446_byxjl.thumb.700_0.jpeg&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1631083883&t=f32698427a136c85c5d7d0e8488c12da"
          alt=""
        />
<span>{{ name }}</span>
      </div>

      <div class="wrap-bottom">
<van-grid gutter="10">
<van-grid-item
            icon="location-o"
            @click="$router.push('/contactLists')"
            text="地址"
          />
<van-grid-item icon="like-o" text="喜欢" />
<van-grid-item
            icon="shopping-cart-o"
            @click="$router.push('/cart')"
            text="购物车"
          />
          <van-grid-item icon="friends-o" text="联系人" />
          <van-grid-item icon="phone-o" text="电话" />
          <van-grid-item icon="star-o" text="收藏" />
          <van-grid-item icon="comment-o" text="留言" />
      <van-grid-item icon="setting-o" text="设置" />
        </van-grid>
      </div>
    </div>
    <common-tab />
  </div>
</template>

<script>
import CommonTab from 'components/CommonTab'
import CommonHead from 'components/CommonHead'
import { delContact } from 'api'
import { getToken } from 'utils'
export default {
  name: 'user',
  data () {
    return {
      name: 'Lisa'
    }
  },
  created () {
    this.defaultContact()
  },
  methods: {
    defaultContact () {
      delContact({
        token: getToken()
      }).then((res) => {
        console.log(res)
        if (res.data.code === 0) {
          this.name = res.data.data.info.linkMan
        }
      })
    }
  },
  components: {
    CommonTab,
    CommonHead
  }
}
</script>

<style lang="scss" scoped>
.abc{
padding-top: 46px;
padding-bottom:50px;
text-align:center;
.wrap{
height:160px;
position:relative;
border-bottom:1px solid #ccc;
img{
width:80px;
height:80px;
}
span{
position:absolute;
top:150px;
left:165px;
}
}
.wrap-bottom{
margin-top:20px;
}
}
</style>
